using MF.Bus;
using System;

namespace CustomerDomain
{
    public class DemoDomain
    {
        public static int count5 = 0;

        [SubscribeAttribute("order.created", "test5")]
        public void TestSubscribe(BusMessage textMessage)
        {
            lock(this)
            {
                count5++;
            }
            var timestamp = DateTimeOffset.Now.ToUnixTimeSeconds().ToString();
            var msg = string.Format("time:{0},事件:{1},队列:{2},消息:{3}", timestamp, "order.created", "test5", textMessage.JsonData);

            Console.WriteLine(msg);

            //return "hello";
        }
    }
}
